package com.tm.fiverole.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tm.fiverole.entity.UserEntity;
import com.tm.fiverole.entity.Vo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author wangSang
 * @create 2022-08-18 14:47
 */
@Mapper
public interface UserMapper extends BaseMapper<UserEntity> {


    UserEntity queryByUser(String username);

    void updateUser(UserEntity userEntity);

    void updateUserTime(UserEntity userEntity);

    Long queryCount(UserVo user);

    List<UserEntity> queryUser(UserVo user);

    void addUser(UserEntity user);

    UserEntity queryByName(@Param("username") String username);

    void updateUserAll(UserEntity user);

    @Select("select * from mall_sys_user where username=#{username} ")
    UserEntity getUserByUsername(@Param("username") String username);
}
